#!/bin/bash

OUT_PATH=./out
BUILD_PATH=./build

CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [ ! -d "$BUILD_PATH" ];then
    mkdir -p $BUILD_PATH
fi

if [ ! -d "$OUT_PATH" ];then
    mkdir -p $OUT_PATH
fi
cd $OUT_PATH

rm -f ./lib
ln -s ../lib.linux ./lib

cd $CUR_DIR

make -f Makefile.linux clean
make -f Makefile.linux frextract -j12
make -f Makefile.linux frevaluate -j12

